package ca.camosun.inventory.gui;

import ca.camosun.inventory.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
 
public class DashboardActivity extends Activity {
 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dashboard_layout);
 
        /**
         * Creating all buttons instances
         * */
        // Dashboard location button
        Button btn_location = (Button) findViewById(R.id.btn_location);
 
        // Dashboard boxes button
        Button btn_boxes = (Button) findViewById(R.id.btn_boxes);
 
        /**
         * Handling all button click events
         * */
 
        // Listening to location button click
        btn_location.setOnClickListener(new View.OnClickListener() {
 
            @Override
            public void onClick(View view) {
                // Launching Box Location Screen
                Intent i = new Intent(getApplicationContext(), BoxLocationActivity.class);
                startActivity(i);
            }
           
        });
        
        btn_boxes.setOnClickListener(new View.OnClickListener() {
        	 
            @Override
            public void onClick(View view) {
                // Launching Main Screen
                Intent i = new Intent(getApplicationContext(), MainActivity.class);
                startActivity(i);
            }
        });
 
    }
}
